﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using zielonka.co.uk.test.framework.time;

namespace zielonka.co.uk.extensions.system.tests
{
    [TestClass]
    public class GetThisFridayTests
    {
        [TestMethod]
        public void CorrectlyIdentifiesTheFridayFromAGivenDate()
        {
            var expected = new DateTime(2012, 10, 19);
            DateTime date = new KnownWeekClock().Now;
            var actual = date.GetThisFriday();
            Assert.AreEqual(expected.Day, actual.Day);
        }

        [TestMethod]
        public void CorrectlyIdentifiesTheFridayFromAGivenDateSpanningANewYear()
        {
            var expected = new DateTime(2013, 1, 4);
            DateTime date = new DateTime(2012, 12, 31);
            var actual = date.GetThisFriday();
            Assert.AreEqual(expected.Day, actual.Day);
        }
    }
}
